<template>
  <TitleBalance :name="`证书信息`"
                :reason="reason"
                :subtitle="'状态：'+ subtitle">
    <template slot="center">
      <CertTable :value="ereData" />
    </template>
  </TitleBalance>
</template>

<script>
import TitleBalance from './TitleBalance.vue'
import CertTable from './CertTable.vue'
// import cert from '@/api/modules/cert'

export default {
  name: 'Certificate',
  components: { TitleBalance, CertTable },
  props: {
    value: {
      type: Object,
      default: () => { }
    }
  },
  computed: {
    certId () {
      return this.value?.certId
    },
    subtitle () {
      return this.certId ? `已生成` : `未生成`
    },
    ereData () {
      return this.value?.ereData
    },
    reason () {
      return this.value?.failRecord
    },
    urlPdf () {
      return this.value?.urlPdf
    }
  }
}
</script>